package edu.feignServer;

import edu.ribbonConfig.RibbonConfig;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients;
import org.springframework.cloud.netflix.ribbon.RibbonClient;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;

/**
 * Created by JPhoebe on 2017-7-7.
 */

@EnableFeignClients
@EnableDiscoveryClient
@SpringBootApplication
//在yml中ribbon配置  B v1.2 新特性  优先级 > ribbonClient > netflix默认配置
//@RibbonClient(name = "GroupService",configuration = RibbonConfig.class)
public class InitFeignServerApplication {

    @Bean
    public RestTemplate restTemplate()
    {
        return new RestTemplate();
    }

    public static void main(String[] args)
    {
        SpringApplication.run(InitFeignServerApplication.class,args);
    }

}
